package com.qingcloud.common.starter.constant;

public interface SystemConstant {

    ////////////////////前端请求相关常量///////////////////////////
    /**
     * 请求成功返回码
     */
    public final static Integer SUCCESS = 2000;
    /**
     * 需要确认提示返回码
     */
    public final static Integer CONFIRM_CODE = 2001;
    /**
     * 未登录返回码
     */
    public final static Integer NOT_LOGIN = 6000;
    /**
     * 请求失败返回码
     */
    public final static Integer FAILURE = 3000;
    /**
     * 请求验证失败返回码
     */
    public final static Integer PART_SUCCESS = 4000;

    ////////////////////前端请求相关常量结束///////////////////////////
    ////////////////////shiro 认证//////////////////////////////////
    /** 登录用户Shiro权限缓存KEY前缀 */
    public static String PREFIX_USER_SHIRO_CACHE  = "shiro:cache:";

    /** 登录用户Token令牌缓存KEY前缀 */
    public static final String PREFIX_USER_TOKEN  = "user_token_%s";
    /** Token缓存时间：3600秒即一小时 */
    public static final int  TOKEN_EXPIRE_TIME  = 10*60;

    public final static String X_ACCESS_TOKEN = "X-Access-Token";
    public final static String X_SIGN = "X-Sign";
    public final static String X_TIMESTAMP = "X-TIMESTAMP";
    public final static String TOKEN_IS_INVALID_MSG = "Token失效，请重新登录!";

    public static final String jessionId="shiro:sessionId";
    public static final String SESSION_USER = "shiro:sessionUser";

    /////////////////////shiro 认证结束/////////////////////////////////


}
